package com.example.databindingdemo.model;

import androidx.databinding.ObservableField;

public class ObservableFieldModel {
    private String userName = "唐三";
    private ObservableField<String> observableField;

    public ObservableFieldModel() {
        observableField = new ObservableField<>();
        observableField.set(userName);
    }

    public String getUserName() {
        return observableField.get();
    }

    public void setUserName(String userName) {
        observableField.set(userName);
    }
}
